package com.ihr360.excel.service;

import com.ihr360.excel.constant.Ihr360SpreadSheetConstant;
import com.ihr360.excel.vo.CustomSpreadSheetValidateResult;
import com.ihr360.excel.vo.SpreadSheetSpecification;
import com.ihr360.excel.vo.SpreadSheetValidatorRequest;
import feign.Headers;
import feign.RequestLine;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author richey
 */
public interface ValidatorFeignService {

    /**
     * 普通校验
     *
     * @param request
     * @return
     */
    @Headers("Content-Type: application/json")
    @RequestLine(value = "POST " + Ihr360SpreadSheetConstant.COMPLETE_HTTP_COMMON_VALIDATE_PATH)
    SpreadSheetSpecification commonValidate(@RequestBody SpreadSheetValidatorRequest request);

    /**
     * 自定义业务校验
     */
    @Headers("Content-Type: application/json")
    @RequestLine(value = "POST " + Ihr360SpreadSheetConstant.COMPLETE_HTTP_CUSTOM_VALIDATE_PATH)
    CustomSpreadSheetValidateResult validate(@RequestBody SpreadSheetValidatorRequest request);
}
